package com.hunttown.mes.rpc.exception;

import com.hunttown.mes.rpc.domain.enums.ErrorCode;

/**
 * created by wangjunfu on 2016-11-18.
 */
public class ConvertException extends RuntimeException {
    private ErrorCode error;

    public ConvertException(ErrorCode error) {
        super(error.toString());
        this.error = error;
    }

    public ConvertException(String message) {
        super(message);
    }

    public ConvertException(ErrorCode error, String message) {
        super(message);
        this.error = error;
    }

    public ConvertException(ErrorCode error, String message, Throwable cause) {
        super(message, cause);
        this.error = error;
    }

    public ConvertException(String message, Throwable cause) {
        super(message, cause);
    }

    public ErrorCode getError() {
        return error;
    }

    public void setError(ErrorCode error) {
        this.error = error;
    }
}